package com.rk.order.receiver;

import com.rabbitmq.client.Channel;
import com.rk.common.constant.MqConst;
import com.rk.order.service.OrderInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author :Rk.
 * @date : 2022/12/28
 */
@Component
@Slf4j
@RabbitListener(queues = MqConst.QUEUE_TASK_8)
public class PatientTipsRevier {

    @Autowired
    private OrderInfoService orderInfoService;


    @RabbitHandler
    public void process(String tips, Message message, Channel channel) throws Exception {

        //预约提醒
        if("PatientTips".equals(tips)){
            orderInfoService.patientTips();
        }
    }


}
